var koa = require('koa');

var bodyparser = require('koa-bodyparser');

var controller = require('./controller');

var templating = require('./templating');

var staticRes = require('koa-static');

var app = new koa();

app.use(staticRes(__dirname+'/statics'));

app.use(bodyparser());

app.use(controller());

app.use(templating);



var port = 8080;

app.listen(port);

console.log(`http://127.0.0.1:${port}`);